package com.dlc.shop.bean.dto;

import com.dlc.shop.bean.model.OrderItem;
import com.dlc.shop.bean.model.OrderRefund;
import com.dlc.shop.bean.model.RefundDelivery;
import com.dlc.shop.bean.vo.OrderRefundInterventionVO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @author Yami
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class OrderRefundDto extends OrderRefund implements Serializable {

    @Schema(description = "订单编号" )
    private String orderNumber;

    @Schema(description = "实际总值" )
    private Double orderAmount;

    @Schema(description = "支付单ID" )
    private Long settlementId;

    @Schema(description = "支付单号" )
    private String orderPayNo;

    @Schema(description = "收货地址对象" )
    private RefundDelivery refundDelivery;

    @Schema(description = "店铺名称" )
    private String shopName;

    @Schema(description = "订单支付时间" )
    private Date orderPayTime;

    @Schema(description = "申请类型:1,仅退款,2退款退货" )
    private Integer applyType;

    @Schema(description = "是否收到货" )
    private Boolean isReceiver;

    @Schema(description = "订单项" )
    private List<OrderItem> orderItems = new ArrayList<>();
    /**
     * 订单退款状态
     */
    private String refundStatus;
    /**
     * 订单状态
     */
    private Integer status;

    @Schema(description = "订单类型 1团购订单 2秒杀订单 3积分订单" )
    private Integer orderType;

    @Schema(description = "true:可以取消退款  false：不可以取消退款（待发货状态->非整单退款->所有商品已经申请退款->不可取消退款）" )
    private Boolean isCancel;

    /**
     * 订单类别 0.实物商品订单 1. 虚拟商品订单
     */
    @Schema(description = "订单类别 0.实物商品订单 1. 虚拟商品订单" )
    private Integer orderMold;

    @Schema(description = "支付方式" )
    private Integer payType;

    @Schema(description = "平台介入状态 -1.没有介入 1.用户申请介入 2.平台同意介入 3.平台拒绝介入 5.平台同意退款成功 7.平台介入处理中")
    private Integer platformInterventionStatus;

    @Schema(description = "用户申请介入理由")
    private String applyInterventionReason;

    @Schema(description = "用户申请介入凭证")
    private String applyInterventionImgUrls;

    @Schema(description = "平台介入退款方式 1.商家承担 2.商家供应商承担（供应商发货订单） 3.不同意退款")
    private Integer interventionRefundType;

    @Schema(description = "平台介入前的退款金额")
    private Double afterInterventionRefundAmount;

    @Schema(description = "平台留言")
    private String platformMessage;

    @Schema(description = "申请介入时间")
    private Date applyInterventionTime;

    @Schema(description = "用户/商家/供应商补充凭证截至时间，平台开始处理时间")
    private Date interventionEndTime;

    @Schema(description = "平台介入处理截至时间")
    private Date platformProcessingEndTime;

    @Schema(description = "介入完成时间")
    private Date interventionFinishTime;

    @Schema(description = "平台介入凭证列表")
    private List<OrderRefundInterventionVO> orderRefundInterventionList;

    @Schema(description = "能否申请平台介入or申请退款")
    private Boolean canApplyRefund;

    @Schema(description = "选中的赠品orderItemId列表" , requiredMode = Schema.RequiredMode.REQUIRED)
    private List<Long> giveawayItemIds;

    @Schema(description = "用户是否已注销 0.否 1.是" )
    private Integer userWriteOff;

    @Schema(description = "平台介入状态 1.平台介入中 2.介入处理中")
    private Integer handleInterventionStatus;

    @Schema(description = "平台优惠总额" )
    private Double platformAmount;

    @Schema(description = "库存点id")
    private Long stockPointId;

    @Schema(description = "库存点类型(1:仓库, 2:门店)")
    private Integer stockPointType;

    @Schema(description = "退款库存的键列表")
    private List<String> stockKeys;

    @Schema(description = "平台免运费金额" )
    private Double platformFreeFreightAmount;

    @Schema(description = "是否为供应商 1是 0否" )
    private Integer isSupplier;
}
